Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

add documentation for Function type #21649

Merged
merged 1 commit into from
May 1, 2017
Merged

add documentation for Function type #21649

merged 1 commit into from
May 1, 2017

Conversation

nsmith5
Copy link
Contributor

@nsmith5 nsmith5 commented Apr 30, 2017

Addresses the unwieldy auto-generated documentation noted in #20904.

Fixes #20904

@tkelman
Copy link
Contributor

tkelman commented Apr 30, 2017

Wonderful, thanks for the doc improvements!

@nsmith5
Copy link
Contributor Author

nsmith5 commented Apr 30, 2017

Not a problem, its been a good way to get started understanding the contribution process.

and anonymous functions.

```jldoctest
julia> typeof(+) <: Function
Copy link
Contributor

@TotalVerb TotalVerb Apr 30, 2017

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

write as isa(+, Function)

julia> typeof(+) <: Function
true

julia> typeof(x -> x + sin(x)) <: Function
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

write as isa

julia> typeof(x -> x + sin(x)) <: Function
true

julia> typeof(cat) <: Function
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

isa

"""
Function

Abstract type for which all functions are a subtype. This includes operators, functions
Copy link
Contributor

@TotalVerb TotalVerb Apr 30, 2017

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

More accurate would be "for which all functions are instances".

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Ok, thanks!

"""
Function

Abstract type for which all functions are instances. This includes operators, functions
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

"Abstract type for which every function, operator, and lambda is a concrete subtype."? Or is that too dense?

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

How about just "Abstract type of all functions?"

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

"Abstract type of all functions" seems reasonable on this end? :)

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yup, "Abstract type of all functions" seems pretty clear to me too. @ararslan perhaps the examples can be changed to make it clear that functions have their own type and are always a subtype of Function. I think we can rely on the rest of the documentation to make it clear that operators, lambdas and functions are all just functions in Julia.

@ararslan ararslan added the docs This change adds or pertains to documentation label Apr 30, 2017
Copy link
Member

@Sacha0 Sacha0 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks @nsmith5! :)

Copy link
Member

@ararslan ararslan left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

👍 Nice work here!

@nsmith5
Copy link
Contributor Author

nsmith5 commented Apr 30, 2017

@TotalVerb how does this last revision look to you? Also, I'll squash my commits for brevity...

@ararslan
Copy link
Member

Also, I'll squash my commits for brevity...

FYI, there's no need for you to do so yourself, as GitHub now has the option to squash PR commits on merge.

Copy link
Contributor

@TotalVerb TotalVerb left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good. Thanks!

@nsmith5
Copy link
Contributor Author

nsmith5 commented Apr 30, 2017

@ararslan Oh, thanks for the heads up. Do I select that when I make the pull request or does who ever performs the merge do that for me? Also, can you update the Docathon project? I'm keen to fill up the "Boom, done" category :)

@ararslan
Copy link
Member

ararslan commented Apr 30, 2017

Do I select that when I make the pull request or does who ever performs the merge do that for me?

The one who performs the merge selects "Squash and merge" from a dropdown.

Also, can you update the Docathon project?

Absolutely! Done. Thanks again!

@JeffBezanson JeffBezanson merged commit 0be9996 into JuliaLang:master May 1, 2017
@nsmith5 nsmith5 deleted the doc/function branch May 1, 2017 22:01
@StefanKarpinski
Copy link
Member

Does this also need to be fixed on 0.5?

@ararslan
Copy link
Member

ararslan commented May 2, 2017

I just tried it in 0.5 and it's still sitting here hanging... so I think so, yes.

@tkelman
Copy link
Contributor

tkelman commented May 3, 2017

docsystem is different there so will need to refresh my memory on how to get it into the stdlib docs

@nsmith5
Copy link
Contributor Author

nsmith5 commented May 4, 2017

How does the backport process work? branch from release-0.5 and submit pull request there?

@tkelman
Copy link
Contributor

tkelman commented May 4, 2017

Yeah, effectively. Exact steps are described at #17418, but since we have #21684 open and it may need some fiddling with the 0.5 docsystem, I can handle it.

tkelman pushed a commit that referenced this pull request May 4, 2017
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
docs This change adds or pertains to documentation
Projects
None yet
Development

Successfully merging this pull request may close these issues.

7 participants